<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div {
        display: flex;
        align-items: center;
      }
      span {
        margin-left: 10px;
      }
      img {
        width: 45px;
        height: 45px;
      }
    </style>
  </head>
  <body>
    <marquee direction="left" behavior="scroll">
      <div>
        <img
          id="icon"
          src="./sun_icon-playstore.png"
          alt=""
        />
        <span id="message">asd</span>
      </div>
    </marquee>
  </body>
  <script type="text/javascript">
    function setContent(weather, content) {
      var p = document.getElementById("message");
      var image = document.getElementById("icon");
      p.innerText = content;
      switch (weather) {
        case "晴":
          image.src = "./sun_icon-playstore.png";
          break;
        case "多云":
          image.src = "./cloud_icon-playstore.png";
          break;
      }
    }
  </script>
</html>
